package com.sfeir.poc.portal.gui.client.widgets;

import com.google.gwt.user.client.ui.HTMLPanel;

/**
 * This class is used as a Superclass for widgets that just 
 * need to include an iframe or a embed as html
 * @author bostoen.v
 *
 */
public abstract class SimpleHTMLWidget extends AbstractWidget {
	private HTMLPanel newsPanel = null;

	public SimpleHTMLWidget(String url){
		super();
		newsPanel = new HTMLPanel(getHtml(url));
		newsPanel.setWidth("100%");
		newsPanel.setHeight("100%");
		widgetContainer.add(newsPanel);
	}

	//The subclass defines which html to add to the panel
	protected abstract String getHtml(String url);
}
